const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const ObjectId = Schema.Types.ObjectId;

const ReplySchema = new Schema({
  content: { type: String },
  topicId: { type: ObjectId },
  authorId: { type: ObjectId },
  replyId: { type: ObjectId },
  createAt: { type: Date, default: Date.now() },
  updateAt: { type: Date, default: Date.now() },
  deleted: { type: Boolean }
});

module.exports = mongoose.model('Reply', ReplySchema);
